<template>
  <q-dialog v-model="isFlagShow">
    <q-card  style="min-width: 300px">
      <q-card-section class="row">
        <div><h6>系统提示</h6></div>
        <q-space />
      </q-card-section>
      <q-card-section class="row">
        <div>
          <q-icon name="mdi-alert-circle-outline" color="red" size="md"></q-icon>
          <span>&nbsp;&nbsp;&nbsp;&nbsp;{{dlgTitle}}</span>
        </div>
      </q-card-section>
      <q-separator/>
      <q-card-actions align="right">
        <q-btn dense label="关闭" color="primary" @click="close"></q-btn>
      </q-card-actions>
    </q-card>
  </q-dialog>
</template>

<script lang="ts">
import { defineComponent, toRefs, ref } from 'vue';

export default defineComponent({
  name: 'AmyMessage',
  props: {
    message: {
      type: String,
      default: () => {
        return ''
      }
    }
  },
  setup (props, context) {
    let {
      message
    } = toRefs(props);

    //显示控制变量
    let isFlagShow = ref(false);

    //关闭
    const close = () => {
      isFlagShow.value = false;
    }

    //显示
    const show = () => {
      isFlagShow.value = true;
    };

    return {
      message,
      isFlagShow,
      close,
      show
    };
  }
})
</script>

<style scoped>

</style>
